package com.file;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class MainCheck {

    public static void main(String[] args) throws Exception{


        findStringInFile("/Users/tanweihua/Desktop/multiwrite/qqq.txt");
    }

    public static void findStringInFile(String path) throws Exception{
        File file = new File(path);
        InputStreamReader read = new InputStreamReader(new FileInputStream(file),"UTF-8");
        BufferedReader bufferedReader = new BufferedReader(read);

        String line = null;
        while ((line = bufferedReader.readLine()) != null) {
            if (line.contains("谭")) {
                System.out.println(line);
            }
        }
    }
}
